****************************************************************************
* Replication data and code for Pflueger, Siriwardane, and Sunderam (2020),
* Financial Market Risk Perceptions and the Macroeconomy 
****************************************************************************

1) The main code is in pss_create_tables_replication.do. The main data set
is pss_data_replication.dta. See the internet appendix for details of data
construction. 

2) Table 4b is created by the ancillary code mp_shocks_analysis_clean.do, 
which uses the data sets mp_shocks_quarterly.dta and mp_shocks_daily.dta.
The monetary policy shocks we use are all available online from their 
respective authors.

3) Columns 1, 2, 4, and 6 of Table 5 are created by the ancillary code 
forecast_returns.py, which computes Hodrick (1992) standard errors.

This code requires two inputs, both of which are included in the 
Data Files directory.
 - F-F_Research_Data_Factors.csv
 - return_forecasting.dta

Assuming that the appropriate Python packages are installed, 
then the code can be run as: python forecast_returns.py

4) Table 9 is created by the ancillary code iv_error_analysis.do.

There are four inputs used by this .do file:
 - om_crsp_link.csv: 
	A mapping between OptionMetrics secids and CRSP PERMNOs. 
	This is based on the linking table produced by Wharton 
	Research Data Services.
 - TOTAL_VOL_BE_Star_Rolling_MKTCAP_Constituents.csv:
	Contains PERNO-Date assignments to portfolios based on
	quintiles of trailing 60-day daily volatility. These
	are the portfolios that underlie PVS.
- optionm_hvol_all.dta:
	OptionsMetrics historical realized volatility data for
	individual firms.
- optionm_svol_all.dta:
	OptionsMetrics historical standardized implied volatility 
	surfaces for individual firms.

